package com.qyhl.webtv.commonlib.entity.act;

import android.os.Parcel;
import android.os.Parcelable;

import java.util.List;

/**
 * Created on 2017/12/25.
 * @author helin
 */

public class ActivityViewBean implements Parcelable {


    /**
     * 自定义组件
     */
    private ActivityViewDetailBean activityView;

    /**
     * 组件子选项
     */
    private List<ActivityViewOptionBean> viewOptions;

    /**
     * 类型
     */
    private int viewType;
    /**
     * 类型名称
     */
    private String typeName;


    public ActivityViewDetailBean getActivityView() {
        return activityView;
    }

    public void setActivityView(ActivityViewDetailBean activityView) {
        this.activityView = activityView;
    }

    public List<ActivityViewOptionBean> getViewOptions() {
        return viewOptions;
    }

    public void setViewOptions(List<ActivityViewOptionBean> viewOptions) {
        this.viewOptions = viewOptions;
    }

    public int getViewType() {
        return viewType;
    }

    public void setViewType(int viewType) {
        this.viewType = viewType;
    }

    public String getTypeName() {
        return typeName;
    }

    public void setTypeName(String typeName) {
        this.typeName = typeName;
    }


    @Override
    public int describeContents() {
        return 0;
    }

    @Override
    public void writeToParcel(Parcel dest, int flags) {
        dest.writeParcelable(this.activityView, flags);
        dest.writeTypedList(this.viewOptions);
        dest.writeInt(this.viewType);
        dest.writeString(this.typeName);
    }

    public ActivityViewBean() {
    }

    protected ActivityViewBean(Parcel in) {
        this.activityView = in.readParcelable(ActivityViewDetailBean.class.getClassLoader());
        this.viewOptions = in.createTypedArrayList(ActivityViewOptionBean.CREATOR);
        this.viewType = in.readInt();
        this.typeName = in.readString();
    }

    public static final Creator<ActivityViewBean> CREATOR = new Creator<ActivityViewBean>() {
        @Override
        public ActivityViewBean createFromParcel(Parcel source) {
            return new ActivityViewBean(source);
        }

        @Override
        public ActivityViewBean[] newArray(int size) {
            return new ActivityViewBean[size];
        }
    };
}
